package cn.ycc1.logging.controller;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ycc
 * @date 2024/4/3
 */
@RestController
@RequiredArgsConstructor
@Slf4j
public class TestController {

    private static final Logger logger= LoggerFactory.getLogger(TestController.class);

    @GetMapping("/test")
    public String test() {
        logger.info("------------test--------------------");
        logger.debug("==============test debug=====================");
        return "test";
    }

    @GetMapping("/test2")
    public String test2() {
        logger.info("------------test2--------------------");
        logger.debug("==============test2 debug=====================");
        return "test2";
    }
}
